rate = eval(input())
mode = input()
if mode not in ['0','1']:
    print('Incorrect input')
else:
    amount = eval(input())
    result = None
    if mode == '0':
        result = amount * rate
        print('$' + format(amount,'.2f') + ' is '+ format(result,'.2f') + ' Yuan')
    elif mode == '1':
        result = amount / rate
        print(format(amount,'.2f') + ' Yuan' + ' is $' + format(result,'.2f'))